Jinn: Synthesizing a Dynamic Bug Detector for Foreign Language Interfaces

نویسندگان

  • Byeongcheol Lee
  • Martin Hirzel
  • Robert Grimm
  • Ben Wiedermann
  • Kathryn S. McKinley
چکیده

Programming language specifications mandate static and dynamic analyses to preclude syntactic and semantic errors. Although individual languages are usually well-specified, composing languages in multilingual programs is not. Because multilingual programs are prevalent, poor specification is a source of many errors. For example, virtually all Java programs compose Java and C with the Java Native Interface (JNI). Unfortunately, JNI is informally specified and thus, Java compilers and virtual machines (VMs) check only a small subset of JNI constraints. Worse, Java compiler and VM implementations inconsistently check constraints. This paper’s most significant contribution is to show how to synthesize dynamic analyses from state machines to detect foreign function interface (FFI) violations. To demonstrate the generality of our approach, we build FFI state machines that encode specifications for JNI and Python/C. Although we identify over a thousand FFI correctness constraints, we show that they fall into three classes and a modest number of state machines encode them. From these state machines, we generate context-specific FFI dynamic analysis. For Java, we insert this analysis in a library that interposes on all language transitions and thus is compiler and VM independent. We call the resulting dynamic bug detection tool Jinn. We show Jinn detects and diagnoses a wide variety of FFI bugs that other tools do not. This paper lays the foundation for better specification and enforcement of FFIs and a more principled approach to developing correct multilingual software.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dynamic Assessment of a Schizophrenic Foreign Language Learner

Objectives: This case study highlights the applicability of Dynamic Assessment (DA) in exploring the cognitive development and intellectual functioning of a schizophrenic foreign language learner. Methods: The general analytical framework of study to unmask the changes in the learner’s competence is Microgenesis. Results: Analysis of the findings not only supports the Vygotskian view re...

متن کامل

The Effect of Dynamic Assessment of Language Learning: A Review of Literature

Researchers have historically noted the importance of Dynamic Assessment and its effect on students’ language learning. DA offers teachers and learners vast opportunities for language teaching and learning. The present article can be considered as part of the recent trend in the field of language teaching. It attempts to describe Dynamic Assessment and review the literature on the effect of DA ...

متن کامل

Dynamic Assessment: From Underlying Constructs to Implications for Language Teaching

Testing as a general trait of social life has received a great deal of attention by many language teachers and scholars. Throughout history, people have been tested to prove their abilities and experiences or to confirm their capacities. Many authorities have said that assessment and instruction should be integrated as a single and inseparable activity which seeks to understand development by a...

متن کامل

Foreign Language Interfaces for Prolog: A Terse Survey

The availability of good foreign language interfaces is fundamental for the interoperability of different programming languages. While this observation is true for any language, it is especially important for non-mainstream languages such as Prolog, since they are likely to be discarded when shortcomings of the interfaces suggest the adoption of just one implementation language. In this paper w...

متن کامل

Declarative Foreign Function Binding Through Generic Programming

Foreign function interfaces are typically organised monolithically, tying together the specification of each foreign function with the mechanism used to make the function available in the host language. This leads to inflexibile systems, where switching from one binding mechanism to another (say from dynamic binding to static code generation) often requires changing tools and rewriting large po...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009